<?php include 'header.php'; ?>
	<script>
	$(document).ready(function() {
	
	//if submit button is clicked
	$('#submit').click(function () {		
	
	
		
		//Get the data from all the fields
		var FirstName = $('input[name=FirstName]');
		var LastName = $('input[name=LastName]');
		var StreetAddress = $('input[name=StreetAddress]');
		var ZIP = $('input[name=ZIP]');
		var HomePhone = $('input[name=HomePhone]');
		var EmailAddress = $('input[name=EmailAddress]');
	

		
		
		//organize the data properly
		var data =  '&FirstName=' + FirstName.val() + '&LastName=' + LastName.val()  + '&StreetAddress=' + StreetAddress.val()  '&ZIP=' + ZIP.val() + '&HomePhone=' + HomePhone.val()  + '&EmailAddress=' + EmailAddress.val() ;
		
		//disabled all the text fields
		$('.text').attr('disabled','true');
		
		//show the loading sign
		$('.loading').show();
		
		//start the ajax
		$.ajax({
			url: "db/ProcessContactInformation.php",	
			
			type: "POST",
			dataType: "xml",
			//pass the data			
			data: data,		
			
			//Do not cache the page
			cache: false,
			
			//success
			success: function (xml) {				
				//if process.php returned 1/true (send mail success)
				if (data = $('result',xml).text())
				$("#regform").html("<div class='well'>Your Information Has Been Sent You Will Recieve a Response Within 72 Hours. Thank you for contacting Circle Point Hotels.</div>");
				else {
				var data = $('error',xml).text();
				alert(data);
				}
			}		
		});
		
		//cancel the submit button default behaviours
		return false;
	});	
});	
	</script><div id="regform">
	<H1> Contact Circle Point Hotels <H1>
<h4>If you need any additional information or have any special requests <br>
prior to your visit, please call us at 1.800.Circles or fill out the form below.<h4>
	<div id="regform">
	    <form class="form-horizontal" method="post" id="register_form">
		
	 <div class="control-group">
	<label class="control-label" for="FirstName">First Name</label>
    <div class="controls">
	<input class="span3" name="FirstName" type="text"  required>  
    </div>
    </div>
	
	<div class="control-group">
    <label class="control-label" for="LastName">Last Name</label>
    <div class="controls">
    <input class="span3" name="LastName" type="text" required>  
    </div>
	</div>

	
	<div class="control-group">
	<label class="control-label" for="HomePhone"> Home Phone</label>
	<div class="controls">
    <input type = "text" name="HomePhone" 
     pattern = "\(\d{3}\) +\d{3}-\d{4}" required /> 
    (###)###-####
	</div>
	</div>
	
	<div class="control-group">
    <label class="control-label" for="StreetAddres">Address</label>
    <div class="controls">
	<input class="span3" name="StreetAddress" type="text" required>  
    </div>
	</div>
	
	
	
	<div class="control-group">
    <label class="control-label" for="Zip">Zip Code</label>
    <div class="controls">
	<input class="span3" name="Zip" type="text"required>  
	</div>
	</div>
	
	<div class="control-group">
    <label class="control-label" for="inputEmail">Email</label>
	<div class="controls">
    <input class="span3" name="EmailAddress" type="email" required>  
	</div>
	</div>
	
	
    
    <div class="control-group">
    <div class="controls">
    <button type="submit" class="btn">Send Information</button>
    
	</div>
    </div>
	</form>
	</div>
	</div>
	<?php include 'footer.php'; ?>
	
 